<?php

	class Ventana 
	{
		public $border, $title, $puerta;
		private $x;

		public function __set($name, $value)
		{
			if ( isset( $this->$name ) )
			{
				$this->$name = $value;
			}
			else
			{
				trigger_error("Tried to assign to undefined property", E_USER_WARNING);
			}
		}

	
		public function __get($name)
		{
			if ( isset( $this->$name ) )
			{
				return $this->$name;
			}
			else
			{
				trigger_error("Call to undefined property", E_USER_WARNING);
			}
		}

	}

// ***********************************

	error_reporting(E_ALL);

// ***********************************

	$ventana = new Ventana;

	$ventana->border = 1;
	$ventana->marco = "---";

	echo "<pre>";	print_r($ventana); echo "</pre>";
		
?>
